// 接口导入
import instance from '../utils/request'
// 导入工具函数
// import { getToken } from '../utils/token'

// 接口抽取
const getChannels = () => {
  return instance({
    url: '/v1_0/user/channels',
    method: 'get'
    // headers: { Authorization: `Bearer ${getToken().token}` }
  })
}
// 频道列表
const getArticles = ({ channel_id, timestamp }) => {
  return instance({
    url: '/v1_1/articles',
    method: 'get',
    params: { channel_id, timestamp, with_top: 1 }
    // headers: { Authorization: `Bearer ${getToken().token}` }
  })
}
// 暴露出去
export { getChannels, getArticles }
